const utils = require('../../utils')
let express = require('express')

let router = express.Router()

const DICT_DATA = require('../../db/dict.json');

module.exports = [
	{
		path: '/dict',
		request: function ( req, res ) {
			if( !req.code ) {
				res.send(
					utils.resultError('缺少code')
				).end()
			} else {
				res.send(
					utils.resultSuccess(DICT_DATA[req.code]??[])
				).end()
			}

		}
	}
]
